module game{
    export class GameGoalView extends BaseEuiView{
        public btn_ok:eui.Button;

        public txt_already:eui.Label;
        public txt_target:eui.Label;
        
        public constructor($m:BaseController,$parent:eui.Group){
            super($m,$parent);
            this.skinName = "resource/skin/GameGoal.exml";
        }

        public initUI():void{
            super.initUI();

            const self = this;
            this.btn_ok.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeHandler,this);

            this.skin.width = egret.MainContext.instance.stage.stageWidth;
            this.skin.height = egret.MainContext.instance.stage.stageHeight;
        }

        public open(...param:any[]):void {
            super.open(...param);
            this.txt_already.text = "你完成了"+(gameData.curmax)+"个";
            this.txt_target.text = "现在你的目标是"+(gameData.curmax+1)+"个！";
        }

        private closeHandler(){
            App.ViewManager.close(ViewConst.GameGoal);
        }




    }
}